
<%@page import="java.sql.ResultSet"%>
<%@page import="javabean.db_conn"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@include file="public.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="css/animate.min.css"/>
</head>
<body>
	
	<div class="panel">
		<div class="panel-body">
			<div class="col-md-12">
				<h3 class="animated fadeInLeft">订单列表</h3>
			</div>
		</div>
    </div>
	
	
    <div class="col-md-12 padding-0 form-element">
      
        <div class="panel">
			<div class="panel-heading">
				<h3>列表内容</h3>
			</div>
			
			<div class="panel-body">
				<div class="responsive-table">
					<div id="datatables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
						<div class="row">
							<div class="col-sm-12">
								<table class="table table-striped table-bordered dataTable no-footer" width="100%" cellspacing="0"  style="width: 100%;">
									<thead>
										<tr role="row">
											<th class="sorting_asc" style="width:15%;">订单号</th>
											<th class="sorting_asc" style="width:15%;">用户名</th>
											<th class="sorting" style="width:10%;">航班号</th>
											<th class="sorting"  style="width:10%;">乘机人</th>
											<th class="sorting" style="width:15%;">乘机日期</th>
											<th class="sorting" style="width:10%;">舱位</th>
											<th class="sorting"  style="width:15%;">证件号码</th>
											<th class="sorting"  style="width:10%;">联系人</th>
											<th class="sorting"  style="width:15%;">联系电话</th>
											<th class="sorting"  style="width:15%;">价格</th>

											
										</tr>
									</thead>
									
									<tbody>
										<%
											db_conn conn=new db_conn();
											String sql="select * from t_order";
											ResultSet res=conn.executeQuery(sql);
											String row=null;
											while(res.next()){
												if(res.getRow()%3==0){
													row="even";
												}else{
													row="odd";
												}
										%>
									
										<tr role="row" class="<%=row %>">
											<td><%=res.getString(1) %></td>
											<td><%=res.getString(2) %></td>
											<td><%=res.getString(3) %></td>
											<td><%=res.getString(4) %></td>
											<td><%=res.getString(5) %></td>
											<td><%=res.getString(6) %></td>
											<td><%=res.getString(7) %></td>
											<td><%=res.getString(8) %></td>
											<td><%=res.getString(9) %></td>
											<td><%=res.getString(11) %></td>

										</tr>
										<%
											}
										%>
										
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
        </div>
    </div>
	<div class="col-md-12 padding-0 form-element">

		<div class="panel">
			<div class="panel-heading">
				<h3>订单删除</h3>
			</div>

			<div class="panel-body">
				<div class="responsive-table">
					<div id="datatables-example_wrapper2" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
						<div class="row">
							<div class="col-sm-12">
								<table class="table table-striped table-bordered dataTable no-footer" width="100%" cellspacing="0"  style="width: 100%;">
									<thead>
									<tr role="row">
										<th class="sorting_asc" style="width:15%;">订单号</th>
										<th class="sorting_asc" style="width:15%;">用户名</th>
										<th class="sorting" style="width:10%;">航班号</th>
										<th class="sorting"  style="width:10%;">乘机人</th>
										<th class="sorting" style="width:15%;">乘机日期</th>
										<th class="sorting" style="width:10%;">舱位</th>
										<th class="sorting"  style="width:15%;">证件号码</th>
										<th class="sorting"  style="width:10%;">联系人</th>
										<th class="sorting"  style="width:15%;">联系电话</th>
										<th class="sorting"  style="width:15%;">价格</th>
										<th class="sorting"  style="width:20%;">操作</th>
									</tr>
									</thead>

									<tbody>
									<%
										db_conn conn2=new db_conn();
										String sql2="select * from t_order where p_name='12'";
										ResultSet res2=conn.executeQuery(sql);
										String row2=null;
										while(res2.next()){
											if(res2.getRow()%2==0){
												row2="even";
											}else{
												row2="odd";
											}
									%>

									<tr role="row" class="<%=row %>">
										<td><%=res2.getString(1) %></td>
										<td><%=res2.getString(2) %></td>
										<td><%=res2.getString(3) %></td>
										<td><%=res2.getString(4) %></td>
										<td><%=res2.getString(5) %></td>
										<td><%=res2.getString(6) %></td>
										<td><%=res2.getString(7) %></td>
										<td><%=res2.getString(8) %></td>
										<td><%=res2.getString(9) %></td>
										<td><%=res2.getString(11) %></td>
										<td>
											<!--
											<select name="operate">
												<option >删除</option>
												<option >改签</option>
											</select>
											-->

											<a style="text-decoration:none;" href="${pageContext.request.contextPath}/del_order?p_name=<%=res2.getString(4)%>">
												删除
											</a>
										</td>
									</tr>
									<%
										}
									%>

									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

</body>
</html>